<% if params[:remove] -%>

$(".element-editor[data-element-id='<%= @item.id %>']").remove();

<% if @item.class.to_s == 'Element' -%>

$('#element_area .sortable_cell').sortable('refresh');

<% end -%>

Alchemy.growl('<%= j Alchemy.t("item moved to clipboard", name: @item.class.to_s == "Alchemy::Element" ? @item.display_name_with_preview_text : @item.name) %>');

<% else -%>

Alchemy.growl('<%= j Alchemy.t("item copied to clipboard", name: @item.class.to_s == "Alchemy::Element" ? @item.display_name_with_preview_text : @item.name) %>')

<% end -%>

$('#clipboard_button .icon.clipboard').addClass('full');
